﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="adminUser.aspx.cs" Inherits="Admin_adminUser" %>

<%@ Register Src="adminfoot.ascx" TagName="adminfoot" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
        <title>产品管理</title>
    <link rel="stylesheet" href="imgs/admin.css" type="text/css" media="all" />
    <script type="text/javascript" src="../DotNet_net/js/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="imgs/GetAjax.js"></script>
    <script type="text/javascript" src="../DotNet_net/js/common.js"></script>
</head>
<body onload="$('#loading').hide()">
    <form id="form1" runat="server">
<div class="container" id="cpcontainer">
<div id="loading" style="display:block">   
    <div class="loading-indicator">   
        页面正在加载中...   
    </div>   
</div> 
<table class="tb">
<tr class="thead"><th colspan="15">
    用户管理</th></tr>	
  <tr bgcolor="#f5fafe">
	<td style="width: 81px; height: 25px;">ID<a href="#"><img src="imgs/minus.gif" title="按ID排序" /></a></td>
	<td style="width: 140px; height: 25px;">
        用户账号(User)<a href="#"></a></td>
        <td style="width: 140px; height: 25px;">
            用户密码(Pwd)</td>
	<td style="width: 140px; height: 25px;">
        用户角色(roleName)</td>
	<td style="width: 200px; height: 25px;">
        角色描述(description)</td>	
    <td style="width: 200px; height: 25px;">
        注册日期(Date)</td>
	<td style="width: 200px; height: 25px;" align="left">
        操作(编辑，删除)</td>
  </tr>  
      <asp:Repeater ID="Repeater1" runat="server">
      <ItemTemplate>
<tr bgcolor="#f5fafe" >
	<td ><input type="checkbox" value='<%#Eval("adminId") %>' name="m_id"  id="ck1"  class="checkbox" /><%#Eval("adminId")%></td>
	<td style="width: 179px"><%#Eval("adminUser") %></td>
	<td><%#Eval("adminPwd") %></td>
	<td ><a href="#" title='<%#Eval("adminId") %>' onclick="GiveRole(this,this.title)"><%#getRoleById(Convert.ToInt32(Eval("adminId"))) == null ? "未授权": getRoleById(Convert.ToInt32(Eval("adminId"))).Rolename%></a> </td>
	<td><%#getRoleById(Convert.ToInt32(Eval("adminId")))==null?"无描述":getRoleById(Convert.ToInt32(Eval("adminId"))).Description%></td>	
   <td align="left">
       <span style="font-size: 7pt; color: #ff0000"><%#Eval("adminDate", "{0:d}")%></span></td>
	<td style="width: 600px">
	  <input id="Button5" type="button" value="编辑" class='btn' title='<%#Eval("adminId") %>' onclick="javascript:location.href='EditUser.aspx?uid='+this.title+'&state=edit'"/>
	   <input id="btnDel" type="button" value="删除" class='btn' title='<%#Eval("adminId") %>' onclick="if(confirm('确定要删除吗')){$('#loading').show();ajax_get(convertURL('adminUser.aspx?action=delAll&uid='+this.title),'',function(msg){$('#cpcontainer').empty().append(msg);$('#loading').hide();});}else{return false}"/>
	   <input id="btn" type="button" value="解除关联" class="btn" title='<%#Eval("adminId") %>' onclick="if(confirm('确定要解除关联吗')){$('#loading').show();ajax_get(convertURL('adminUser.aspx?action=delTb&uid='+this.title),' ',function(msg){$('#cpcontainer').empty().append(msg);$('#loading').hide();});}else{return false}" /> 
	</td>
  </tr>        
      </ItemTemplate>
      </asp:Repeater>

<tr><td colspan="11"><div class="cuspages"><div class="pages">
 </div></div></td>
</tr>
</table>
  <uc1:adminfoot ID="Adminfoot1" runat="server" />
</div>
<script type="text/javascript">
function GiveRole(tg,title)
{
   var  el=$(tg).prev()[0];
   _1=el;openWindow2(101,320,25,0);
	var msgDiv=document.getElementById("msg");
	var _t = tg.offsetTop;
    var _l = tg.offsetLeft;
    while (tg = tg.offsetParent){_t+=tg.offsetTop; _l+=tg.offsetLeft;}
    msgDiv.style.cssText+="border:1px solid #55BBFF;background: #C1E7FF;padding:3px 0px 3px 4px;height: auto;"
	msgDiv.style.top = (_t-1)+"px";
    msgDiv.style.left = (_l-1)+"px";
	msgDiv.innerHTML='<button type="button" class="btn" style="margin:0 6px 0 0;height:23px;float:right;padding:0;" onclick="closeWin()">关闭</button><iframe src="FileDownLoad/selectRole.aspx?adminId='+title+'" scrolling="no" topmargin="0"  height:auto;overflow:auto;  marginwidth="0" marginheight="0" frameborder="0" align="center"  onload="this.height=this.contentWindow.document.documentElement.scrollHeight"></iframe>';
}
</script>

 </form>
</body>
</html>